package com.example.authority.service.impl;

import cn.hutool.core.util.StrUtil;
import cn.hutool.db.Db;
import cn.hutool.db.ds.simple.SimpleDataSource;
import cn.hutool.json.JSONUtil;
import cn.smallbun.screw.core.Configuration;
import cn.smallbun.screw.core.engine.EngineConfig;
import cn.smallbun.screw.core.engine.EngineFileType;
import cn.smallbun.screw.core.engine.EngineTemplateType;
import cn.smallbun.screw.core.execute.DocumentationExecute;
import cn.smallbun.screw.core.process.ProcessConfig;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.generator.FastAutoGenerator;
import com.baomidou.mybatisplus.generator.config.OutputFile;
import com.baomidou.mybatisplus.generator.fill.Column;
import com.baomidou.mybatisplus.generator.fill.Property;
import com.example.authority.common.Constant;
import com.example.authority.entity.Permission;
import com.example.authority.entity.Record;
import com.example.authority.entity.dto.GeneratorDto;
import com.example.authority.entity.dto.SqlDto;
import com.example.authority.service.GeneratorService;
import com.example.authority.service.PermissionService;
import com.example.authority.service.RecordService;
import com.example.authority.utils.DataGeneratorUtil;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import javax.sql.DataSource;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Properties;
import java.util.stream.Collectors;

/**
 * @program: authority
 * @ClassName:GeneratorServiceImpl
 * @description: 代码生成器实现类
 * @author:dyy
 * @Version 3.0
 **/
@Service
@Slf4j

public class GeneratorServiceImpl implements GeneratorService {


    /**
     * 构建代码方法
     *
     * @param generatorDto
     * @throws SQLException
     */
    @Override
    public void generatorCode(GeneratorDto generatorDto) throws SQLException, ClassNotFoundException, InterruptedException, IOException {
//        todo   免费版本不提供代码生成功能,  可以联系作者微信navicat15进行对接！

    }



}